import pandas as pd
target_file = "DESED_AS_OD_meta.tsv"

# random sample 1/4 of the original file

df = pd.read_csv(target_file, sep="\t", header=None)
df = df.sample(frac=0.25, random_state=42)  # Adjust the fraction as needed
df.to_csv("train_unlabeled_od_AudioSetStrong.tsv", sep="\t", header=False, index=False)